<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
  <th:block th:include="include :: header('项目进度')" />
</head>
<body class="gray-bg">
<div class="container-div">
  <div class="row">
    <div class="col-sm-12 select-table table-striped">
      <table id="bootstrap-table" data-mobile-responsive="true"></table>
    </div>
  </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
  var sewageDatas = [[${@dict.getType('sewage_type')}]];
  var progressDatas = [[${@dict.getType('project_progress')}]];
  var prefix = ctx + "customer/projectProgress";

  $(function() {
    var options = {
      url: prefix + "/list",
      updateUrl: prefix + "/edit/{id}",
      modalName: "项目",
      showSearch: false,
      showColumns: false,
      showToggle: false,
      showExport: false,
      columns: [
        {
          field : 'projectId',
          title : '项目ID',
          visible: false
        },
        {
          field : 'projectName',
          title : '项目公司名称'
        },
        {
          field : 'progressCode',
          title : '项目进度',
          formatter: function(value, row, index) {
            return $.table.selectDictLabel(progressDatas, value);
          }
        },
        {
          field : 'sewageType',
          title : '污水类型',
          formatter: function(value, row, index) {
            return $.table.selectDictLabel(sewageDatas, value);
          }
        },
        {
          field : 'designIntake',
          title : '设计进水量(t/d)'
        },
        {
          field : 'actualIntake',
          title : '实际进水量(t/d)'
        },
        {
          field: 'projectPrice',
          title: '项目金额(元)'
        },
        {
          field: 'techPrice',
          title: '技术服务费(元)'
        },
        {
          field : 'createTime',
          title : '创建时间'
        },
        {
          title: '操作',
          align: 'center',
          formatter: function(value, row, index) {
            var actions = [];
            actions.push('<a class="btn btn-success btn-xs"  href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.projectId + '\')"><i class="fa fa-edit"></i>项目进度</a> ');
            return actions.join('');
          }
        }]
    };
    $.table.init(options);
  });
</script>
</body>
</html>